package net.qhzw.vip.qiyu.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import net.qhzw.vip.qiyu.entity.SysPrivilege;
import net.qhzw.vip.qiyu.mapper.SysPrivilegeMapper;
import net.qhzw.vip.qiyu.service.SysPrivilegeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SysPrivilegeServiceImpl extends ServiceImpl<SysPrivilegeMapper, SysPrivilege> implements SysPrivilegeService {


    @Autowired
    private SysPrivilegeMapper sysPrivilegeMapper;

    /***
     * 根据userId查询权限数据
     * @param userId
     * @return
     */
    @Override
    public List<SysPrivilege> getPrivilegeByUserId(Long userId) {
        return sysPrivilegeMapper.findPrivilegeByUserId(userId);
    }
}
